package com.hotel.reservation.service.impl;


import com.hotel.reservation.dao.ReserveDao;
import com.hotel.reservation.service.ReserveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hotel.reservation.po.ReservePo;

import java.util.List;
import java.util.Map;

@Service("reserveService")
public class ReserveServiceImpl implements ReserveService {

    @Autowired
    private ReserveDao reserveDao;

    @Override
    public ReservePo selectById(String id) {
        return reserveDao.selectById(id);
    }

    @Override
    public List<ReservePo> selectAll() {
        return reserveDao.selectAll();
    }

    @Override
    public int insertInfo(ReservePo info) {
        int i=reserveDao.insertInfo(info);
        return i;

    }

    @Override
    public List<ReservePo> selectByRoomId(String roomId) {
        return reserveDao.selectByRoomId(roomId);
    }

    @Override
    public Integer deleteByRoomId(int reserveId) {
        return reserveDao.deleteByRoomId(reserveId);
    }

    @Override
    public List<ReservePo> selectAllReserveByPage(Map<String, Object> map) {
        return reserveDao.selectAllReserveByPage(map);
    }
}
